{% extends "base.html" %}

{% block title %}{{ coach.name }} - 万岛潜水{% endblock %}

{% block content %}
<div class="container">
    <div class="row mb-4">
        <div class="col-12">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="{{ url_for('main.index') }}">首页</a></li>
                    <li class="breadcrumb-item"><a href="{{ url_for('main.coaches') }}">教练团队</a></li>
                    <li class="breadcrumb-item active" aria-current="page">{{ coach.name }}</li>
                </ol>
            </nav>
        </div>
    </div>
    
    <div class="row mb-5">
        <div class="col-md-4 mb-4">
            <div class="card shadow-sm">
                <img src="{{ url_for('static', filename='uploads/' + coach.photo) }}" class="card-img-top" alt="{{ coach.name }}">
                <div class="card-body">
                    <h1 class="card-title h4">{{ coach.name }}</h1>
                    <p class="card-text"><span class="badge bg-primary">{{ coach.specialty }}</span></p>
                    <p class="card-text"><i class="fas fa-award text-warning me-2"></i>{{ coach.experience }}年潜水经验</p>
                    <div class="d-grid gap-2">
                        <a href="{{ url_for('main.booking') }}?coach_id={{ coach.id }}" class="btn btn-primary">与TA预约潜水</a>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-8">
            <div class="card shadow-sm mb-4">
                <div class="card-body">
                    <h2 class="card-title h4">教练介绍</h2>
                    <p class="card-text">{{ coach.introduction }}</p>
                </div>
            </div>
            
            <div class="card shadow-sm mb-4">
                <div class="card-body">
                    <h2 class="card-title h4">专业资质</h2>
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item"><i class="fas fa-certificate text-primary me-2"></i>国际潜水教练协会(PADI)认证教练</li>
                        <li class="list-group-item"><i class="fas fa-certificate text-primary me-2"></i>急救和氧气供应员(EFR)认证</li>
                        <li class="list-group-item"><i class="fas fa-certificate text-primary me-2"></i>救援潜水员教练认证</li>
                        {% if coach.experience > 8 %}
                        <li class="list-group-item"><i class="fas fa-certificate text-primary me-2"></i>高级开放水域教练认证</li>
                        {% endif %}
                        {% if coach.specialty == '水下摄影' %}
                        <li class="list-group-item"><i class="fas fa-certificate text-primary me-2"></i>水下摄影专业教练认证</li>
                        {% endif %}
                    </ul>
                </div>
            </div>
            
            <div class="card shadow-sm">
                <div class="card-body">
                    <h2 class="card-title h4">教学课程</h2>
                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <div class="card h-100">
                                <div class="card-body">
                                    <h5 class="card-title">体验潜水</h5>
                                    <p class="card-text">适合初次接触潜水的朋友，在教练一对一指导下，体验海底世界的奇妙。</p>
                                    <a href="{{ url_for('main.courses') }}" class="btn btn-sm btn-outline-primary">了解更多</a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6 mb-3">
                            <div class="card h-100">
                                <div class="card-body">
                                    <h5 class="card-title">开放水域潜水员课程</h5>
                                    <p class="card-text">获取国际认可的入门级潜水证书，开启您的潜水生涯。</p>
                                    <a href="{{ url_for('main.courses') }}" class="btn btn-sm btn-outline-primary">了解更多</a>
                                </div>
                            </div>
                        </div>
                        {% if coach.experience > 5 %}
                        <div class="col-md-6 mb-3">
                            <div class="card h-100">
                                <div class="card-body">
                                    <h5 class="card-title">进阶潜水员课程</h5>
                                    <p class="card-text">提升您的潜水技能，学习更多专业知识，完成后可获得进阶潜水员证书。</p>
                                    <a href="{{ url_for('main.courses') }}" class="btn btn-sm btn-outline-primary">了解更多</a>
                                </div>
                            </div>
                        </div>
                        {% endif %}
                        {% if coach.specialty == '水下摄影' %}
                        <div class="col-md-6 mb-3">
                            <div class="card h-100">
                                <div class="card-body">
                                    <h5 class="card-title">水下摄影课程</h5>
                                    <p class="card-text">学习水下摄影技巧，捕捉海底世界的精彩瞬间。</p>
                                    <a href="{{ url_for('main.courses') }}" class="btn btn-sm btn-outline-primary">了解更多</a>
                                </div>
                            </div>
                        </div>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-12">
            <div class="card bg-light">
                <div class="card-body">
                    <h3 class="card-title text-center">学员评价</h3>
                    <div class="row mt-4">
                        <div class="col-md-4 mb-3">
                            <div class="card">
                                <div class="card-body">
                                    <div class="d-flex mb-3">
                                        <div class="flex-shrink-0">
                                            <img src="{{ url_for('static', filename='img/avatar1.jpg') }}" class="rounded-circle" width="50" height="50" alt="学员头像">
                                        </div>
                                        <div class="flex-grow-1 ms-3">
                                            <h5 class="mb-0">张先生</h5>
                                            <div class="text-warning">
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                            </div>
                                        </div>
                                    </div>
                                    <p class="card-text">教练非常专业，耐心细致，让我这个第一次潜水的新手很快就适应了水下环境。拍的照片也很棒！</p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4 mb-3">
                            <div class="card">
                                <div class="card-body">
                                    <div class="d-flex mb-3">
                                        <div class="flex-shrink-0">
                                            <img src="{{ url_for('static', filename='img/avatar2.jpg') }}" class="rounded-circle" width="50" height="50" alt="学员头像">
                                        </div>
                                        <div class="flex-grow-1 ms-3">
                                            <h5 class="mb-0">李女士</h5>
                                            <div class="text-warning">
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                            </div>
                                        </div>
                                    </div>
                                    <p class="card-text">在教练的指导下完成了开放水域潜水员课程，理论讲解清晰，实践指导到位，非常满意！</p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4 mb-3">
                            <div class="card">
                                <div class="card-body">
                                    <div class="d-flex mb-3">
                                        <div class="flex-shrink-0">
                                            <img src="{{ url_for('static', filename='img/avatar3.jpg') }}" class="rounded-circle" width="50" height="50" alt="学员头像">
                                        </div>
                                        <div class="flex-grow-1 ms-3">
                                            <h5 class="mb-0">王先生</h5>
                                            <div class="text-warning">
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star"></i>
                                                <i class="fas fa-star-half-alt"></i>
                                            </div>
                                        </div>
                                    </div>
                                    <p class="card-text">教练带我们去了几个很棒的潜点，看到了丰富的海洋生物，安全意识很强，全程照顾得很周到。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 